package com.iflytek.day26;

import java.io.FileOutputStream;
import java.io.IOException;

public class _03_FileOutputStreamDemo {
  public static void main(String[] args) throws IOException {
    // 创建字节输出流对象
    // FileOutputStream fos = new FileOutputStream("src\\com\\iflytek\\day26\\fos.txt");
    FileOutputStream fos = new FileOutputStream("src\\com\\iflytek\\day26\\fos.txt", true);

    // 写数据
    for (int i = 0; i < 10; i++) {
      fos.write("hello".getBytes());
      fos.write("\r\n".getBytes());
    }

    // 释放资源
    fos.close();
  }
}
